//1.使用scanf()读取用户的名和姓
//2.使用strlen()分别计算用户的名和姓各自的字符数
//3.按要求使用printf()的修饰符进行格式输出

#include <stdio.h>
#include <string.h>

int main(void)
{
    char last_name[40], first_name[40];

    printf("Please enter your last name: ");
    scanf("%s", last_name);
    printf("Now enter your first name: ");
    scanf("%s", first_name);

    int ln = strlen(last_name);
    int fn = strlen(first_name);

    printf("%s %s\n", last_name, first_name);
    printf("%*d %*d\n", ln, ln, fn, fn);
    printf("%s %s\n", last_name, first_name);
    printf("%-*d %-*d\n", ln, ln, fn, fn);
    
    return 0;
}